#!/bin/bash
#
a=0
b=0

while read line;do
 name=$(echo $line | awk -F: '{print $7}')
if [ $name == "/bin/bash" ];then
let  a++
elif [ $name == "/sbin/nologin" ];then
let  b++
fi

done < /etc/passwd


echo "/bin/bash用户有$a,/sbin/nologin用户有$b"
